package com.sjq.mapper;


import com.sjq.model.entity.Rating;

import java.util.List;

/**
 * ratingMapper接口
 *
 * @author sjq
 * @date 2022-03-14
 */
public interface RatingMapper
{
    /**
     * 查询rating
     *
     * @param id ratingID
     * @return rating
     */
    public Rating selectRatingById(Long id);

    /**
     * 查询rating列表
     *
     * @param rating rating
     * @return rating集合
     */
    public List<Rating> selectRatingList(Rating rating);

    /**
     * 新增rating
     *
     * @param rating rating
     * @return 结果
     */
    public int insertRating(Rating rating);

    /**
     * 修改rating
     *
     * @param rating rating
     * @return 结果
     */
    public int updateRating(Rating rating);

    /**
     * 删除rating
     *
     * @param id ratingID
     * @return 结果
     */
    public int deleteRatingById(Long id);

    /**
     * 批量删除rating
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteRatingByIds(Long[] ids);

    /**
     * 通过稿件id 查找专家评论
     * @param paperId
     * @return
     */
    List<Rating> selectRatingListByPaperId(Long paperId);
}
